<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var num = [1,2,3,4,5,6,7]
        console.log(num.length);
        console.log(num)
        var num1 = new Array(5,6,7,8,9,10);
        console.log(num1)
        var num2 = new Array(5);
        console.log(num2)

        var arr = new Array(true,1,'empty',undefined,null,)
        console.log(arr);
        
        // 稀疏数组：数组有长度，但是数组只有某些地方有值
        num2[2] = '50';
        num2[4] = '飘';
        console.log(num2);

        // 二维数组
        var arr1 = [
            [1,2,3],
            [4,5,6],
            [7,8,9]
        ]
        console.log(arr1);
        console.log(arr1[1][2]); // 6

    </script>
</body>
</html>